<?php
$DECKROOT = getcwd();

require('./config/config.php');
include $DECKROOT . '/classes/database/'.$dbType.".php";


# LOAD XML FILE
$XML = new DOMDocument();
$Decklist = new pmtData($dbHost,$dbUser,$dbPass,$dbName);
if($Decklist->getDeckList() != null)
{
	$XML->loadXML( $Decklist->getDeckList() );
}
?>
<LINK rel="stylesheet" type="text/css" href="css/LP_css.css">
<?php
# DEFINE STYLESHEET
$deckXSL = './xsl/lp_decks.xsl';
$XSL = new DOMDocument();
$XSL->load( $deckXSL );

# START XSLT
$xslt = new XSLTProcessor();
$xslt->importStylesheet( $XSL );

#PRINT
echo $xslt->transformToXML( $XML );


$XML = new DOMDocument();
$Deck = new pmtData($dbHost,$dbUser,$dbPass,$dbName,'3');
$deckID = 1;
if($Deck->getDeck($deckID) != null)
{
	$XML->loadXML( $Deck->getDeck($deckID) );
}

# DEFINE STYLESHEET
$deckXSL = './xsl/lp_decks.xsl';
$XSL = new DOMDocument();
$XSL->load( $deckXSL );

# START XSLT
$xslt = new XSLTProcessor();
$xslt->importStylesheet( $XSL );

#PRINT
echo $xslt->transformToXML( $XML );
?>